const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  runtimeCompiler: true,
  pluginOptions: {
    electronBuilder: {
      builderOptions: {
        productName: "xxxx",
        appId: "com.leon.xxxxx",
        copyright: "xxxx",
        directories: {
          output: "dist_electron",
        },
        nsis: {
          oneClick: false,
          allowElevation: true,
          allowToChangeInstallationDirectory: true,
          installerIcon: "./dist_electron/icons/aaa.ico",
          uninstallerIcon: "./dist_electron/icons/bbb.ico",
          installerHeaderIcon: "./dist_electron/icons/aaa.ico",
          createDesktopShortcut: true,
          createStartMenuShortcut: true,
          shortcutName: "xxxx",
          include: "dist_electron/script/installer.nsh",
        },
        publish: [
          {
            provider: "generic",
            url: "http://xxxxx/",
          },
        ],
        dmg: {
          contents: [
            {
              x: 410,
              y: 150,
              type: "link",
              path: "/Applications",
            },
            {
              x: 130,
              y: 150,
              type: "file",
            },
          ],
        },
        mac: {
          icon: "dist_electron/icons/icon.icns",
        },
        win: {
          icon: "dist_electron/icons/aims.ico",
          target: [
            {
              target: "nsis",
              arch: ["ia32"],
            },
          ],
        },
        linux: {
          icon: "dist_electron/icons",
        },
      },
    },
  },
});
